<template>
  <div id="app">
    <div class="weather">
      <div class="city">{{ weather.city }}</div>
      <div class="temperature"><span class="num">{{ weather.temperature }}</span><span class="unit">°C</span></div>
      <div class="range">
        <span>{{ weather.range }}</span>
      </div>
      <div><span class="sky">{{ weather.sky }}</span><span class="air">{{ weather.air }}</span></div>
    </div>
  </div>
</template>

<script>

export default {
  name: 'App',
  components: {
  },
  data() {
    return {
      weather: {
        city: '北京',
        temperature: 3,
        range: '-3°C ~ 6°C',
        sky: '阴',
        air: '中度污染'
      }
    }
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}

.weather .city {
  font-size: 26px;
}
.temperature {
  vertical-align: top;
}
.temperature .num {
  font-size: 80px;
}
.temperature .unit {
  display: inline-block;
  padding-top: 20px;
  vertical-align: top;
}
.range {
  padding: 10px;
}
.sky {
  margin-right: 10px;
}
.air {
  margin-left: 10px;
}

</style>
